package cn.zwx.search.service;

import cn.zwx.search.model.es.ESProduct;
import cn.zwx.search.model.req.DelDocReq;
import cn.zwx.search.model.req.FindDocByIdReq;

import java.util.List;

/**
 * @description: 商品APi
 * @projectName:search-example
 * @see:cn.zwx.search.service
 * @author:zhangwenxue
 * @createTime:2020/10/24 13:28
 * @version:1.0
 */
public interface ProductService {
    /**
     * @description 创建索引
     * @return void
     * @author zhangwenxue
     * @createTime 2020/10/24 13:44
     **/
    void createIndex(List<ESProduct> productList);

    /**
     * @description 删除文档
     * @return java.lang.String
     * @author zhangwenxue
     * @createTime 2020/10/23 15:55
     **/
    void delDoc(DelDocReq delDocReq);

    /**
     * @description 删除索引
     * @return java.lang.String
     * @author zhangwenxue
     * @createTime 2020/10/23 15:55
     **/
    void delIndex(String index);

    /**
     * @description 更新文档
     * @return java.lang.String
     * @author zhangwenxue
     * @createTime 2020/10/23 15:55
     **/
    void updateDoc(List<ESProduct> proList);

    /***
     * @description 根据id查询文档信息
     * @return void
     * @author zhangwenxue
     * @createTimeFindDocByIdReq 2020/10/24 17:05
     **/
    ESProduct findDocById(FindDocByIdReq req);
}
